<template>
  <div class="statistics-card">
    <div class="card-icon">
      <el-icon><User /></el-icon>
    </div>
    <div class="card-text">
      <p class="text">Users</p>
      <p class="number">{{ num.user }}</p>
    </div>
  </div>
  <div class="statistics-card">
    <div class="card-icon">
      <el-icon><ChatDotRound /></el-icon>
    </div>
    <div class="card-text">
      <p class="text">Messages</p>
      <p class="number">{{ num.mess }}</p>
    </div>
  </div>
  <div class="statistics-card">
    <div class="card-icon">
      <el-icon><Money /></el-icon>
    </div>
    <div class="card-text">
      <p class="text">Money</p>
      <p class="number">{{ num.mone }}</p>
    </div>
  </div>
  <div class="statistics-card">
    <div class="card-icon">
      <el-icon><ShoppingCart /></el-icon>
    </div>
    <div class="card-text">
      <p class="text">Shopping</p>
      <p class="number">{{ num.shop }}</p>
    </div>
  </div>
</template>

<script setup lang="ts">
import { toRefs } from "vue";
const cardNumber = defineProps({
  num: {
    user: String,
    mess: String,
    mone: String,
    shop: String,
  },
});

const { num } = toRefs(cardNumber);
</script>

<style scoped lang="scss">
.statistics-card {
  background-color: #fff;
  border-radius: 5px;
  width: 24%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  cursor: pointer;
  box-sizing: border-box;
  .card-icon {
    margin: 5px;
    .el-icon,
    .el-icon svg {
      height: 2.5em !important;
      width: 2.5em !important;
    }
  }
  .card-text {
    margin: 5px;
    p {
      margin: 5px 0;
      font-size: 16px;
    }
    .text {
      line-height: 18px;
      color: rgba(0, 0, 0, 0.45);
      font-size: 18px;
      margin-bottom: 12px;
    }
  }
}
</style>
